﻿using System;
using System.Collections.Generic;
using Google.Protobuf;
namespace HotFix_Project
{
    public class InstanceClass
    {
        private int id;

        public InstanceClass()
        {
            // UnityEngine.Debug.Log("!!! InstanceClass::InstanceClass()");
            this.id = 0;
        }

        public InstanceClass(int id)
        {
            // UnityEngine.Debug.Log("!!! InstanceClass::InstanceClass() id = " + id);
            this.id = id;
        }

        public int ID
        {
            get { return id; }
        }

        // static method
        public static void StaticFunTest()
        {
            Person a = new Person();
            a.Age = 12;

            Byte[] bt = a.ToByteArray();

            IMessage im = new Person();
            Person p = new Person();
            p = (Person)im.Descriptor.Parser.ParseFrom(bt);

            UnityEngine.Debug.Log(p);
        }

        public static void StaticFunTest2(int a)
        {
            UnityEngine.Debug.Log("!!! InstanceClass.StaticFunTest2(), a=" + a);
        }

        public static void GenericMethod<T>(T a)
        {
            UnityEngine.Debug.Log("!!! InstanceClass.GenericMethod(), a=" + a);
        }
    }


}
